Resolves the Trailing Characters error in Neovim when performing search and replace on multi-line visual selections by handling newline characters.